﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using themovieproduction.siniflar;

namespace themovieproduction
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (Request.Form["login"] !=null)
            {
                 uyeler u = new uyeler();
                 u.setKullaniciadi = Request.Form["txtKullaniciAdi"];
                 u.setParola = Request.Form["txtParola"];
                if (Request.Form["cbBeniHatirla"] != null)
                 {
                     if (Request.Cookies["kullpass"] != null)
                     {
                         u.kuki_denetleme(Request.Cookies["kullpass"]);
                     }
                     else
                     {                  
                         Response.Cookies.Add(u.kuki_yarat());
                     }
                 }
                else
                {
                    u.giris();
                }

                Response.Redirect(u.yetki());
            }
       
        }
    }
}